 <meta charset="utf-8">
<div class="box box-primary" id="app_progress_add">
            <form role="form" id="editForm">
              <div class="box-body" style="overflow: hidden;">
                 <div class="form-group">
                  <label for="name">进展名称</label>
                  <input type="text"   v-model="progress.name"  name="name" class="form-control" id="name" placeholder="请输入名称" required>
                </div> 
                
                <div class="form-group">
                  <label for="enabled" >是否启用</label>
                  <select v-model="progress.enabled" id="enabled" name="enabled"  class="form-control"  required >
                    <option value="1">启用</option>
                    <option value="0">禁用</option>
                  </select>
                </div>
                 
                 <div class="form-group">
                  <label for="remark">进展描述</label>
                  <input type="text"   v-model="progress.remark" name="remark"  class="form-control" id=remark  >
                </div> 
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                 <button type="button" class="btn btn-default" v-on:click="cancel">取消</button>
                 <button type="button" class="btn btn-info pull-right"  v-on:click="add">提交</button>
              </div>
            </form>

<script type="text/javascript">
var vm = new Vue({
        el: '#app_progress_add',
        data: {
        	progress:{
        			name: undefined,
        			enabled: undefined,
        			remark: undefined
        		 },
        	    bus:new Vue()
        },
         methods: {
        	 add: function () {
        	    	if($("#editForm").valid()){
        	    		let _this=this;
        	    		var url="/tcms/progress/addProgress";
        	    		zfesAjax.ajaxTodo(url,_this.$data.progress, function(data){
        	    			alertSwal.successText(data.message);
        	    			 layer.close(layer.index);
        	    		})
        	    	}
        	    },
        	    cancel:function(){
        	    	 layer.close(layer.index);
        	    	 
        	    }
        }
    })

 </script>
</div>